package com.gitee.huanminabc.fastboot.web.validation;


import com.gitee.huanminabc.fastboot.web.annotation.validation.Validated;

import java.lang.annotation.Annotation;

/**
 * @description:
 * @author: huanmin
 * @create: 2025-04-02 15:11
 **/
public class GroupValidationVerify implements ValidationVerify {
    @Override
    public Class<?> getAnnotation() {
        return Validated.class;
    }

    @Override
    public void verify(Object value, Annotation annotation,String gprmc) throws Exception {
        if (value==null){
            return;
        }
        Validated validated = (Validated) annotation;
        Class<?>[] group = validated.value();
        ValidationUtil.verifyClassGroup(value, group,gprmc);
    }
}
